local tActivityHanle = {};

--#include "ActivitySubHandle.lua" once  --活动注册协议事件方法

--#include "data\functions\Systems\ActivitySystem\ActivityUtils.lua" once
--#include "data\functions\Activity\Dart\ApplyDartCommon.lua" once
--#include "ProbabilityIndexDrop.lua" once

--#include "data\config\item\EquipChange.lua" once --套装装备转换

--#include "data\config\activity\StdActivityCfg.lua" once
--#include "chuanfushuangbeiHandle.lua" once	-- 全服双倍
--#include "data\functions\Activity\ActivityLog.lua"   once         --活动参与日志记录


tActivityHanle[tagActivityType.HHCGActivity] = {}
tActivityHanle[tagActivityType.WLZBActivity] = {}
tActivityHanle[tagActivityType.BGXLActivity] = {}
tActivityHanle[tagActivityType.CFSBActivity] = {}
tActivityHanle[tagActivityType.JMZCActivity] = {}
tActivityHanle[tagActivityType.MBCZActivity] = {}
tActivityHanle[tagActivityType.ZYZActivity] = {}
tActivityHanle[tagActivityType.WCWJActivity] = {}
tActivityHanle[tagActivityType.YBJNHActivity] = {}

--[[旧活动，暂时不要，使用"ActivitySubHandle.lua的方法
function ActivityHandleImpl(sysarg, systemid, msgid, packet)
	if msgid == LogicCmd.activitySys.sub.cFreshActorDart then 	--刷新个人镖车
		ActorChangeSlave(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cStartActorDart then	--开始押镖
		StartDart(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cEnterWorshipActivity then	-- 进行膜拜城主泡点活动
		onDespiseOrWorship(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cWorshipMsg then	--膜拜或者鄙视
		onWorshipActivity(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cFreshWorshipRate then	--膜拜刷新倍率-
		onRefreshAward(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cContinueEscort then	--继续护送
		ContinueEscort(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cGetGiveUpDart then	--放弃护送
		AbandonEscort(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cUseInvincibleSkill then	-- 无敌镖车技能
		UseInvincibleSkill(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cUseInvincibleSkill then	-- 行会求救技能
		UseGuildHelpSkill(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cExitActivity then	-- 退出活动
		exitActivity(sysarg,packet)
	elseif msgid == LogicCmd.activitySys.sub.cEnterNextLayer then	-- 进入下一层
		enterNextLayer(sysarg,packet)
	else
		ActivitySubHandleImpl(sysarg, systemid, msgid, packet)
	end
end
]]

-- 检测时间
function checkTimer(tOpenTime)
	local bInRange = 0;
	local nIdx = -1;
	for i = 1, #tOpenTime do
		local starHour = tonumber(tOpenTime[i][1]);
		if starHour == 0 then
			starHour = 24;
		end
		
		local endHour = tonumber(tOpenTime[i][3]);
		if endHour == 0 then
			endHour = 24;
		end
		
		if (System.isInTimeRange(starHour, tonumber(tOpenTime[i][2]), 0, endHour, tonumber(tOpenTime[i][4]), 0)) == true then
			bInRange = 1;
			nIdx = i;
			break;
		end
	end
	return bInRange, nIdx;
end

-- 活动场景杀怪处理
function activityKillMonsterHandle(sysarg, args)
	local pMonsterptr = args[1];
	local monId = args[2];
	local fbid = args[3];
	local sceneid = args[4];
	local pfbptr = args[5];
	
	local dvar = Actor.getDyanmicVar(sysarg)
	if not dvar or not dvar.activityid then
		return;
	end
	
	local activityfun = tActivityHanle[dvar.activityid];
	if activityfun then
		local func = activityfun["update_killmonstercount"];
		if func then
			func(sysarg, pMonsterptr, dvar.activityid, sceneid);
		end
	end
end

-- 退出活动
function exitActivity(sysarg, packet)
	local activityid = DataPack.readUInt( packet );
	local activityfun = tActivityHanle[activityid];
	if activityfun then
		local func = activityfun["onmsg_exit"];
		if func then
			func(sysarg, pMonsterptr, activityid, sceneid);
		end
	end
end

-- 进入下一层
function enterNextLayer(sysarg, packet)
	local activityid = DataPack.readUInt( packet );
	local activityfun = tActivityHanle[activityid];
	if activityfun then
		local func = activityfun["onmsg_enternextlayer"];
		if func then
			func(sysarg, pMonsterptr, activityid, sceneid);
		end
	end
end


function SendRecoverResult( sysarg, result )
	local netPack = DataPack.allocPacket(sysarg, 145, LogicCmd.activitySys.sub.sSendRecoverResult)  --申请一个数据包
	if netPack then
		DataPack.writeByte(netPack, result)
		DataPack.flush(netPack)
	end
end

function CheckCanDropItem( nItemId )
	for k, itId in ipairs(KillEvilConfig.NoDropItems) do
		if nItemId == itId then
			return true
		end
	end
	return false
end

function RecoverEquip( sysarg, packet )
	local recoverType = DataPack.readByte( packet )
	local useGold = DataPack.readByte( packet )
	local equipCount = DataPack.readByte( packet )
	if equipCount == 0 or equipCount > KillEvilConfig.MaxEquipCount then
		return
	end
	local needItemCount = 0
	local pointCount = 0
	local equipPtrTab = {}
	for i = 1, equipCount do
		local equipGuid = DataPack.readDouble( packet )
		local equipPtr = Item.getBagItemPtrByGuid( sysarg, equipGuid)
		if equipPtr then
			local cfgTab = nil
			local itemId = Item.getItemId(equipPtr)
			local nItemType = Item.getItemProperty( sysarg, equipPtr, Item.ipItemType, 0)
			if nItemType == Item.itHpPot then
				local curExpCount = Item.getItemProperty(sysarg, equipPtr, Item.ipItemDua, 0)
				local maxExpCount = Item.getItemProperty(sysarg, equipPtr, Item.ipItemDuaMax, 0)
				if curExpCount < maxExpCount then
					Actor.sendTipmsg(sysarg, string.format(Lang.ScriptTips.mt00045, Item.getItemName(itemId)), ttFlyTip)
					return
				end
				cfgTab = KillEvilConfig.ExpJade[itemId]
			else
				if nItemType < Item.itWeapon or nItemType >= Item.itEquipMax then
					Actor.sendTipmsg(sysarg, string.format(Lang.ScriptTips.mt00046, Item.getItemName(itemId)), ttFlyTip)
					return
				end	
				local nLevel = Item.getItemProperty(sysarg, equipPtr, Item.ipItemActorLevel, 0)
				if nLevel < KillEvilConfig.MinEquipLevel then
					Actor.sendTipmsg(sysarg, string.format(Lang.ScriptTips.mt00024, Item.getItemName(itemId), KillEvilConfig.MinEquipLevel), ttFlyTip)
					return
				end
				cfgTab = GetKillEvilCfgByLv(nLevel)
			end
			if cfgTab then
				pointCount = pointCount + cfgTab.point
				if recoverType == 2 then
					needItemCount = needItemCount + cfgTab.dbStoneCount
				end
				table.insert(equipPtrTab, equipPtr)
			end
			if CheckCanDropItem(itemId) then
				Actor.sendTipmsg( sysarg, string.format(Lang.ScriptTips.mt00027, Item.getItemName(itemId)), ttFlyTip)
				return
			end
		end
	end
	if recoverType == 2 then
		local nGridCount= Item.getBagEmptyGridCount(sysarg)
		local needBagGrid = #equipPtrTab
		 if nGridCount < needBagGrid then
			Actor.sendTipmsg( sysarg, string.format(Lang.ScriptTips.mt00029, needBagGrid*2, needBagGrid), ttScreenCenter)
			return
		 end
		local deductItemCount = needItemCount
		local myItemCount = Actor.getItemCount( sysarg, KillEvilConfig.ItemId )
		if myItemCount < needItemCount then
			deductItemCount = myItemCount
			if useGold == 1 then
				local needMoney = (needItemCount - myItemCount)*KillEvilConfig.ItemGold
				local myGold = Actor.getIntProperty(sysarg,PROP_ACTOR_YUANBAO)
				if myGold < needMoney then
					Actor.sendTipmsg( sysarg, string.format(Lang.ScriptTips.zf093, needMoney - myGold), ttFlyTip )
					return
				end
				if not Actor.changeMoney(sysarg, mtYuanbao, -needMoney, GameLog.clRenowBuyConsumeMoney, Lang.LogTips.yb014) then
					return
				end
			else
				Actor.sendTipmsg( sysarg, string.format(Lang.ScriptTips.zf092, needItemCount - myItemCount), ttFlyTip )
				return
			end
		end
		if deductItemCount > 0 and Actor.removeItem(sysarg, KillEvilConfig.ItemId, deductItemCount) ~= deductItemCount then
			return
		end
	end
	for k, ptr in ipairs(equipPtrTab) do
		local nItemType = Item.getItemProperty( sysarg, ptr, Item.ipItemType, 0)
		local cfgTab = nil
		local itemId = Item.getItemId(ptr)
		if nItemType == Item.itHpPot then
			cfgTab = KillEvilConfig.ExpJade[itemId]
		else
			local nLevel = Item.getItemProperty(sysarg, ptr, Item.ipItemActorLevel, 0)
			cfgTab = GetKillEvilCfgByLv(nLevel)
		end
		local rateId = cfgTab.normalRateId
		if recoverType == 2 then
			rateId = cfgTab.doubleRateId
		end
		if Actor.removeItemByPtr(sysarg, ptr, 1, true, Lang.LogTips.l00106, 94) > 0 then
			SetKillEvilPoint(sysarg, cfgTab.point)
			local cbInfo = ProbabilityIndexDropImpl[rateId]
			if cbInfo then
				for i = 1, recoverType do
					cbInfo.func(sysarg, cbInfo.params)
				end
			end
		end
	end
	SendRecoverResult(sysarg, 0)
	Actor.triggerQuestEvent(sysarg, 127, 50092, 1)
end

function CheckExchangeEquipTimes( sysarg, packet )
	local nRemainTimes = 0;
	local svar = Actor.getStaticVar(sysarg)
	if svar.changeEquipCount == nil then
		svar.changeEquipCount = 0
	elseif svar.changeEquipCount > ChangeVocationEquipTable.MaxCount then
		svar.changeEquipCount = ChangeVocationEquipTable.MaxCount
	end
	nRemainTimes = ChangeVocationEquipTable.MaxCount - svar.changeEquipCount

	local npack = DataPack.allocPacket(sysarg, LogicCmd.activitySys.sysId, 17)
	DataPack.writeByte(npack, nRemainTimes )
	DataPack.flush(npack)
end

--请求进入场景
function CheckOnEnterScene( sysarg, packet)
	local nSceneId = DataPack.readUInt( packet )
	if nSceneId == 62 then	--山泉屋
		local nmItemId = 592	--泉水罐			
		if Actor.canAddItem(sysarg , nmItemId, 1) then
			Actor.addItem(sysarg, nmItemId, 0, 0, 1, 1, 0, "getFountainBox", 1) 
		else
			Actor.sendTipmsg(sysarg,Lang.Activity.fou0007, ttFlyTip) 
			return false
		end
	end
	Fuben.OnEnterFuBen(sysarg,nSceneId)
end

--返回id,价格
function GetNewEquipID(changeID, oldItemID)
	local equipTB = ChangeVocationEquipTable[1]
	for i=1, table.getn(equipTB) do
	if i ~= changeID then	--不在要转换的目标行里面查找
		for k,v in ipairs(equipTB[i]) do
    		if v == oldItemID then
    			local targetTB = equipTB[changeID]
    			local priceTB = ChangeVocationEquipTable.price
    			return targetTB[k],priceTB[k]
    		end
    	end
    end
	end
	return 0,0
end

--[[
已经不使用了
]]
function ExchangeEquip( sysarg, packet, msgid )
	local nIdx = DataPack.readByte( packet )
	local equipCount = DataPack.readByte( packet )
	--这个可以单独配置
	if equipCount == 0 or equipCount > 20 then
		return
	end

	local svar = Actor.getStaticVar(sysarg)
	if svar.changeVocationFlag == nil then
		Actor.sendTipmsg(sysarg, Lang.ScriptTips.mt00049, ttFlyTip)
		return				
	end
	
	if svar.changeVocationFlag == 0 then
		Actor.sendTipmsg(sysarg, Lang.ScriptTips.mt00049, ttFlyTip)
		return				
	end

	if svar.changeEquipCount == nil then
		svar.changeEquipCount = 0
	end

	if svar.changeEquipCount + equipCount > ChangeVocationEquipTable.MaxCount then 
		Actor.sendTipmsg(sysarg, string.format(Lang.ScriptTips.mt00048, ChangeVocationEquipTable.MaxCount-svar.changeEquipCount), ttFlyTip)
		return		
	end
	
	local npack = nil
	if msgid== cExchangeEquip then
		npack = DataPack.allocPacket(sysarg, LogicCmd.activitySys.sysId, 15)
		DataPack.writeByte(npack, equipCount)
	end	

	local equipPtrTab = {}
	for i = 1, equipCount do
		local equipGuid = DataPack.readDouble( packet )
		local equipPtr = Item.getBagItemPtrByGuid( sysarg, equipGuid)
		if equipPtr then
			local cfgTab = nil
			local itemId = Item.getItemId(equipPtr)
			local nItemType = Item.getItemProperty( sysarg, equipPtr, Item.ipItemType, 0)
			if nItemType < Item.itWeapon or nItemType >= Item.itEquipMax then
				Actor.sendTipmsg(sysarg, string.format(Lang.ScriptTips.mt00047, Item.getItemName(itemId)), ttFlyTip)
				return
			end
			
			--取出新装备和价钱
			local nNewItemId, nNeedGold = GetNewEquipID(nIdx, itemId)
			
			--发送新提示
			if msgid== cExchangeEquip then
				DataPack.writeUInt(npack, itemId)
				DataPack.writeUInt(npack, nNewItemId)
				DataPack.writeUInt(npack, nNeedGold)
			elseif nNewItemId ~=0 then
				--判断钱够不够
				local GoldType= PROP_ACTOR_YUANBAO
				local GoldTypeChange= mtYuanbao
	
				local myGold = Actor.getIntProperty(sysarg,GoldType)
				if myGold < nNeedGold then
					Actor.sendTipmsg( sysarg, string.format(Lang.ScriptTips.zf400, nNeedGold - myGold), ttFlyTip )
					return
				end
				
				--获取其他附加属性
				local propTab = {}
				--鉴定属性
				AuthValTab = {
					Item.ipItemForgeProperty1Value,
					Item.ipItemForgeProperty2Value,
					Item.ipItemForgeProperty3Value,
				}
				local authTimes = Item.getItemProperty( sysarg, equipPtr, Item.ipItemForgeTimes, 0 )
				propTab[Item.ipItemForgeTimes] = authTimes;
				for authIdx, authVar in ipairs(AuthValTab) do
					local tempVal = Item.getItemProperty( sysarg, equipPtr, authVar, 0)
					propTab[authVar] = tempVal
				end
				local initSmith = Item.getItemProperty( sysarg, equipPtr, Item.ipItemSpecSmith, 0)
				
				local nStrong = Item.getItemProperty(sysarg, equipPtr, Item.ipItemStrong, 0)
				if nStrong <= 0 then
					nStrong = 0
				end
				
				local nQuality = Item.getItemProperty( sysarg, equipPtr, Item.ipItemQuality, 0 )
				local nLuck = Item.getItemProperty( sysarg, equipPtr, Item.ipItemLuck, 0 )
				
				--扣钱
				if not Actor.changeMoney(sysarg, GoldTypeChange, -nNeedGold, GameLog.clUpgradeConsumeMoney, Lang.LogTips.l00160) then
					return
				end
				
				--删除旧物品
				local isItemInBag = true
				if Actor.removeItemByPtr(sysarg, equipPtr, 1, true, Lang.LogTips.l00161, 92) == 0 then
					if Item.removeEquip(sysarg, equipPtr, Lang.LogTips.l00161, 92) == 0 then
						return
					end
					isItemInBag = false
				end
	
				--创建新装备
				local newItemPtr = Item.createItem(nNewItemId, 1, nStrong, nQuality);
				if newItemPtr then
					Item.addItem(sysarg, newItemPtr, Lang.LogTips.l00070, 93)
					if initSmith > 0 then
						Item.setItemProperty( sysarg, newItemPtr, Item.ipItemSpecSmith, initSmith)
					end
					for propId, propVal in pairs(propTab) do
						Item.setItemProperty( sysarg, newItemPtr, propId, propVal)
					end
					if nLuck > 0 then
						Item.setItemProperty( sysarg, newItemPtr, Item.ipItemLuck, nLuck)
					end
					svar.changeEquipCount = svar.changeEquipCount+1
				end
			end --end if
		else --取不到物品指针
			if msgid== cExchangeEquip then
				DataPack.writeUInt(npack, itemId)
				DataPack.writeUInt(npack, 0)
				DataPack.writeUInt(npack, 0)
			end
		end --end if
	end --end for
	
	if msgid== cExchangeEquip then
		DataPack.flush(npack)
	end
end


-- 退出武林争霸
tActivityHanle[tagActivityType.WLZBActivity].onmsg_exit = function(sysarg, activityid, packet)
	exit_wlzb(sysarg);
	return true;
end


-- 退出行会闯关活动
tActivityHanle[tagActivityType.HHCGActivity].onmsg_exit = function(sysarg, activityid, packet)
	exit_hhcg(sysarg);
	return true;
end

-- 请求退出闭关修炼
tActivityHanle[tagActivityType.BGXLActivity].onmsg_exit = function(sysarg, activityid, packet)
	exit_bgxl(sysarg);
	return true;
end


-- 退出活动巨魔之巢
tActivityHanle[tagActivityType.JMZCActivity].onmsg_exit = function(sysarg, activityid, packet)
	exit_jmzc(sysarg);
	return true;
end

-- 请求退出阵营战
tActivityHanle[tagActivityType.ZYZActivity].onmsg_exit = function(sysarg, activityid, packet)
	local sdvar = System.getDyanmicVar()
	local actorId = Actor.getIntProperty(sysarg, PROP_ENTITY_ID)
	resetActorRanking(sdvar.zyzRank, 1, actorId);
	exit_zyz(sysarg);
	return true;
end

-- 更新数据
tActivityHanle[2].update_killmonstercount = function(sysarg, monster, activityid, sceneId)
	--[[
	local tScene = StdActivityCfg[activityid].tScene;
	if not tScene then return; end

	local bIsActivityScene = false;
	local sceneidx = 0;
	for i,v in ipairs(tScene) do
		if sceneId == v[2] then
			bIsActivityScene = true;
			sceneidx = i;
			break;
		end
	end

	if bIsActivityScene == false then
		return;
	end
	
	local dvar = Actor.getDyanmicVar(sysarg);
	if not dvar then dvar = {} end
	if not dvar.killCount then dvar.killCount = 0 end
	dvar.killCount = dvar.killCount + 1;
	send_jmzc_data(sysarg, activityid, dvar.killCount)
	--]]
end

-- 活动区域改变处理
function activityAreaChangeHanle(sysarg, args)
	local sdvar = System.getDyanmicVar()
	local sceneId = Actor.getSceneId(sysarg);
	local dvar = Actor.getDyanmicVar(sysarg)

	--[[   --活动屏蔽
	
	-- 闭关修炼
	local bgxlcfg = StdActivityCfg[tagActivityType.BGXLActivity];
	if nil ~= sdvar.bgxlflag and nil ~= dvar.jionmb then
		if bgxlcfg.sceneid ~= sceneId then
			exit_bgxl(sysarg)
		end
	end
	
	-- 巨魔之巢
	if nil ~= sdvar.jmzcstart and nil ~= dvar.joinjmzc then
		local isNoJmzc = false;
		local jmzccfg = StdActivityCfg[tagActivityType.JMZCActivity];
		for _, v in ipairs(jmzccfg.tScene or {}) do
			if nil ~= v then
				if sceneId == v[2] then
					isNoJmzc = true;
					break;
				end
			end
		end
		
		if isNoJmzc == false then
			exit_jmzc(sysarg);
		end
	end

	-- 膜拜泡点处理
	if nil ~= sdvar.mbczstart then
		local mbcfg = StdActivityCfg[tagActivityType.MBCZActivity];
		if mbcfg.sceneId == sceneId then
			if Actor.hasMapAreaAttri(sysarg, aaPaoDianAddExpArea) == true then
				if nil == dvar.jionmb then
					onWorshipActivity(sysarg);
				end
			else
				if nil ~= dvar.jionmb then
					exit_mbpd(sysarg, mbcfg);
				end
			end
		else
			if nil ~= dvar.jionmb then
				exit_mbpd(sysarg, mbcfg);
			end
		end
	end
	
	-- 嘉年华
	if nil ~= sdvar.ybjnhflags then
		local wlzbcfg = StdActivityCfg[tagActivityType.YBJNHActivity];
		if wlzbcfg.sceneId ~= sceneId then
			if nil ~= dvar.joinjnh then
				exit_ybjnh(sysarg)
			end
		else
			if nil == dvar.joinjnh then
				send_ybjnh_data(sysarg)
			end
		end
	end
	
	-- 王城危机
	if nil ~= sdvar.wcwjStartTime then
		local wcwjcfg = StdActivityCfg[tagActivityType.WCWJActivity];
		if wcwjcfg.sceneId == sceneId then
			if nil == dvar.joinwcwj then
				update_wcwj_data(sysarg);
			end
		else
			if nil ~= dvar.joinwcwj then
				exit_wcwj(sysarg)
			end
		end
	end
	
	-- 武林争霸
	local wlzbcfg = StdActivityCfg[tagActivityType.WLZBActivity];
	if nil ~= sdvar.WuLinZhengBaState and nil ~= dvar.joinwlzb then
		if wlzbcfg.lowSceenId ~= sceneId then
			exit_wlzb(sysarg)
		end
	end
	
	--阵营战
	local zyzcfg = StdActivityCfg[tagActivityType.ZYZActivity];
	if nil ~= sdvar.CampBattleStartFlag and nil ~= dvar.joinzyzflag then
		if zyzcfg.sceneId ~= sceneId then
			exit_zyz(sysarg);
		end
	end
	
	--行会闯关
	if nil ~= sdvar.guildstart and nil ~= dvar.joinhhcg then
		local isNohhcg = 0;
		local hhcgcfg = StdActivityCfg[tagActivityType.HHCGActivity];
		for _, v in ipairs(hhcgcfg.scenedata or {}) do
			if nil ~= v then
				if sceneId == v[1] then
					isNohhcg = 1;
					break;
				end
			end
		end
		
		if isNohhcg == 0 then
			exit_hhcg(sysarg);
		end
	end
	
	-- 禁用战将
	if sceneId == wlzbcfg.lowSceenId or sceneId == zyzcfg.sceneId or sceneId == 5 or sceneId == bgxlcfg.sceneid then
		if Actor.hasMapAreaAttri(sysarg, aaNotCallZhanJiang) == true then
			Actor.CheckMapLimitBattle(sysarg);
		end
	end

	]]
end


function reliveExitActivityHandle(sysarg)
	--[[
	local dvar = Actor.getDyanmicVar(sysarg)
	
	-- 闭关修炼
	if nil ~= dvar.jionmb then
		exit_bgxl(sysarg)
	end

	-- 巨魔之巢
	if nil ~= dvar.joinjmzc then
		exit_jmzc(sysarg);
	end

	-- 膜拜泡点处理
	if nil ~= dvar.jionmb then
		exit_mbpd(sysarg, mbcfg);
	end

	--行会闯关
	if nil ~= dvar.joinhhcg then
		exit_hhcg(sysarg);
	end

	-- 王城危机
	if nil ~= dvar.joinwcwj then
		exit_wcwj(sysarg)
	end

	-- 武林争霸
	if nil ~= dvar.joinwlzb then
		exit_wlzb(sysarg)
	end
	]]
end


table.insert(InitFnTable, InitProbabilityIndexDrop)
SystemHandlerDispatcher.registerSystemHander(BaseTypes.SystemId.enActivitySystem, ActivityHandleImpl)
EventCallDispatcher.registerEventCall(BaseTypes.ActorEventId.aeActivityKillMonsterHandle, activityKillMonsterHandle)
EventCallDispatcher.registerEventCall(BaseTypes.ActorEventId.aeAreaChangeScript, activityAreaChangeHanle)
